From: Olivier Fourdan Date: Thu, 7 Apr 2016 13:56:46 +0000 (+0200) Subject: wayland: do not update shadows for child windows X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~2168 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=83e775147f35145ff4e7122089fb48ddf8617fa5;p=gtk%2B3.0.git wayland: do not update shadows for child windows glade-previewer places a gtkwindow inside another toplevel gtkwindow, updating the shadow width for the client induces a busy loop where the parent will grow continuously until it crashes gnome-shell/mutter. To avoid the loop, do not update the shadow width if not dealing with a toplevel window. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=761651 --- diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index f1d736c885..72053cf893 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7104,13 +7104,15 @@ update_realized_window_properties (GtkWindow *window, { GtkWindowPrivate *priv = window->priv; + if (!_gtk_widget_is_toplevel (GTK_WIDGET (window))) + return; + if (priv->client_decorated && priv->use_client_shadow) update_shadow_width (window, window_border); update_opaque_region (window, window_border, child_allocation); - if (_gtk_widget_is_toplevel (GTK_WIDGET (window))) - update_border_windows (window); + update_border_windows (window); } static void